//
//  WSJSepctialBtn.m
//  WSJCareNursingPeopleView
//
//  Created by wsj2015 on 16/4/8.
//  Copyright © 2016年 wsj2015. All rights reserved.
//

#import "WSJSepctialBtn.h"

@interface WSJSepctialBtn ()
@property (nonatomic,  strong) UILabel *myLabel;




@end

@implementation WSJSepctialBtn



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.myLabel =[UILabel new];
        self.myLabel.text = @"待确认";
        self.myLabel.font =[UIFont systemFontOfSize:14];
        self.myLabel.textColor = kTxtColor;
        self.myLabel.textAlignment = NSTextAlignmentCenter;
        [self setBackgroundColor:[UIColor clearColor]];
        self.myImageView =[UIImageView new];
        self.myImageView.image =[UIImage imageNamed:@"Arrow_Down"];
//        self.myImageView.backgroundColor =[UIColor purpleColor];
        [self addSubview:self.myLabel];
        [self addSubview:self.myImageView];
        
        UIView *lineO =[UIView new];
        lineO.backgroundColor = kBorderColor;
        lineO.tag = 201;
        UIView *lineT =[UIView new];
        lineT.backgroundColor = kBorderColor;
        lineT.tag = 202;
        [self addSubview:lineO];
        [self addSubview:lineT];
    }
    return self;
}
- (void)layoutSubviews
{
    
    CGFloat w =self.bounds.size.width;
    CGFloat h =self.bounds.size.height;
    UIView *lineO =[self viewWithTag:201];
    UIView *lineT =[self viewWithTag:202];
    lineO.frame = CGRectMake(0, 0, w, kOnePX);
    lineT.frame = CGRectMake(0, h -kOnePX, w, kOnePX);
  
    
    self.myLabel.frame = CGRectMake((w -60)/2, 2, 60, 18);
    self.myImageView.frame =CGRectMake((w -14)/2, 22, 14, 14);
    
    
    [super layoutSubviews];
}


@end
